package me.android.library.common.orm;

import android.annotation.SuppressLint;
import android.database.sqlite.SQLiteOpenHelper;

import lombok.Getter;
import lombok.Setter;
import me.android.library.common.orm.ability.DsAdmin;
import me.android.library.common.service.AbstractService;

@Setter
public class DbService extends AbstractService implements DsAdmin {
    private static class SingletonHolder {
        @SuppressLint("StaticFieldLeak")
        static final DbService instance = new DbService();
    }

    public static DbService getInstance() {
        return DbService.SingletonHolder.instance;
    }

    @Getter
    @Setter
    private SQLiteOpenHelper helper;

    private DbService() {
    }

    public void init(SQLiteOpenHelper helper) {
        this.helper = helper;
    }

}
